<@override name="title">个人博客</@override>

<@override name="content">
<form id="queryForm" method="get">
    <input type="hidden" id="pageNum" name="pageNum">
    <input type="hidden" id="c" name="c">
    <input type="hidden" id="sort" name="sort" value="last">
</form>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人博客</title>
</head>
<body>
<a id="back_top" href="script:;">
    <span>⌆</span>
</a>
<div>
<#list page.items as article>

<div style="margin-top:20px;width:50%;margin-left:10%">
    <HR>
<a style="font-size:25px;" href="${base}\article\${article.id}">${article.name!}</a>
<div style="margin-top:10px;font-size:18px">${article.des!}</div>


</div>
</#list>
<div class="page-box" style="margin-left:8.8%">
    <#if !page.firstPage>
    <a class="page-next" href="javascript:void(0)"  onclick="queryPage('1','${c!}','${sort!}')">首页</a>
    <a class="page-next" href="javascript:void(0)" onclick="queryPage('${page.pageNum-1}','${c!}','${sort!}')">上一页</a>
</#if>

<#list page.showNums as n>
<#if page.pageNum == n>
<a class="page-cur" href="javascript:void(0)" >${n}</a>
<#else>
<a class="page-num" href="javascript:void(0)"  onclick="queryPage('${n}','${c!}','${sort!}')">${n}</a>
</#if>
</#list>

<#if !page.lastPage>
<a class="page-next" href="javascript:void(0)" onclick="queryPage('${page.pageNum+1}','${c!}','${sort!}')">下一页</a>
<a class="page-next" href="javascript:void(0)" onclick="queryPage('${page.pageTotalCount}','${c!}','${sort!}')">尾页</a>
</#if>
</div>
</div>

</body>
<script type="text/javascript">
    function queryPage(pageNum, c, sort){
        $('#pageNum').val(pageNum);
        $('#c').val(c);
        if(sort){
            $('#sort').val(sort);
        }
        $('#queryForm').submit();
    }
</script>
</html>
</@override>
<@extends name="_base.html" />